/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using iMES.Entity.SystemModels;

namespace iMES.Entity.DomainModels
{
    [Entity(TableCnName = "过程检验",TableName = "Quality_ProcessCheck",DetailTable =  new Type[] { typeof(Quality_ProcessCheckTestItem)},DetailTableCnName = "过程检验单-检验项",DBServer = "SysDbContext")]
    public partial class Quality_ProcessCheck:SysEntity
    {
        /// <summary>
       ///过程检验单主键
       /// </summary>
       [Key]
       [Display(Name ="过程检验单主键")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int ProcessCheckId { get; set; }

       /// <summary>
       ///检验单名称
       /// </summary>
       [Display(Name ="检验单名称")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string ProcessCheckName { get; set; }

       /// <summary>
       ///检验单编码
       /// </summary>
       [Display(Name ="检验单编码")]
       [MaxLength(100)]
       [Column(TypeName="varchar(100)")]
       [Editable(true)]
       public string ProcessCheckCode { get; set; }

       /// <summary>
       ///检验类型
       /// </summary>
       [Display(Name ="检验类型")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string CheckType { get; set; }

       /// <summary>
       ///工单
       /// </summary>
       [Display(Name ="工单")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int WorkOrder_Id { get; set; }

       /// <summary>
       ///工单编号
       /// </summary>
       [Display(Name ="工单编号")]
       [MaxLength(100)]
       [Column(TypeName="varchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string WorkOrderCode { get; set; }

       /// <summary>
       ///产品
       /// </summary>
       [Display(Name ="产品")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int Product_Id { get; set; }

       /// <summary>
       ///产品名称
       /// </summary>
       [Display(Name ="产品名称")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string ProductName { get; set; }

       /// <summary>
       ///产品编码
       /// </summary>
       [Display(Name ="产品编码")]
       [MaxLength(100)]
       [Column(TypeName="varchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string ProductCode { get; set; }

       /// <summary>
       ///规格型号
       /// </summary>
       [Display(Name ="规格型号")]
       [MaxLength(200)]
       [Column(TypeName="nvarchar(200)")]
       [Editable(true)]
       public string ProductStandard { get; set; }

       /// <summary>
       ///工序
       /// </summary>
       [Display(Name ="工序")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? Process_Id { get; set; }

       /// <summary>
       ///工序编码
       /// </summary>
       [Display(Name ="工序编码")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string ProcessCode { get; set; }

       /// <summary>
       ///工序名称
       /// </summary>
       [Display(Name ="工序名称")]
       [MaxLength(100)]
       [Column(TypeName="varchar(100)")]
       [Editable(true)]
       public string ProcessName { get; set; }

       /// <summary>
       ///合格品数量
       /// </summary>
       [Display(Name ="合格品数量")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? StandNumber { get; set; }

       /// <summary>
       ///不合格数
       /// </summary>
       [Display(Name ="不合格数")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? DisStandNumber { get; set; }

       /// <summary>
       ///致命缺陷数量
       /// </summary>
       [Display(Name ="致命缺陷数量")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? CrQuantity { get; set; }

       /// <summary>
       ///严重缺陷数量
       /// </summary>
       [Display(Name ="严重缺陷数量")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? MajQuantity { get; set; }

       /// <summary>
       ///轻微缺陷数量
       /// </summary>
       [Display(Name ="轻微缺陷数量")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? MinQuantity { get; set; }

       /// <summary>
       ///检测日期
       /// </summary>
       [Display(Name ="检测日期")]
       [Column(TypeName="date")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public DateTime CheckDate { get; set; }

       /// <summary>
       ///检测结果
       /// </summary>
       [Display(Name ="检测结果")]
       [MaxLength(100)]
       [Column(TypeName="varchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string Result { get; set; }

       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(1000)]
       [Column(TypeName="nvarchar(1000)")]
       [Editable(true)]
       public string Remark { get; set; }

       /// <summary>
       ///创建人编号
       /// </summary>
       [Display(Name ="创建人编号")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? CreateID { get; set; }

       /// <summary>
       ///创建人
       /// </summary>
       [Display(Name ="创建人")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string Creator { get; set; }

       /// <summary>
       ///创建时间
       /// </summary>
       [Display(Name ="创建时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? CreateDate { get; set; }

       /// <summary>
       ///修改人编号
       /// </summary>
       [Display(Name ="修改人编号")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? ModifyID { get; set; }

       /// <summary>
       ///修改人
       /// </summary>
       [Display(Name ="修改人")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string Modifier { get; set; }

       /// <summary>
       ///修改时间
       /// </summary>
       [Display(Name ="修改时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? ModifyDate { get; set; }

       [Display(Name ="过程检验单-检验项")]
       [ForeignKey("ProcessCheckId")]
       public List<Quality_ProcessCheckTestItem> Quality_ProcessCheckTestItem { get; set; }

    }
}